package com.wenwan.manage.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wenwan.manage.service.UserAuthenticationService;

import javax.annotation.Resource;

/**
 * 用户认证
 * 
 * @author Admin
 *
 */
@Controller
@RequestMapping("/user/authentication")
public class UserAuthenticationController {

	@Autowired
	private UserAuthenticationService userAuthenticationService;

	@ResponseBody
	@RequestMapping(value = "/create", method = { RequestMethod.POST })
	public Map<String,Object> create(@RequestParam(required = true) String userId,
			@RequestParam(required = true) String realName, @RequestParam(required = true) String birthday,
			@RequestParam(required = true) String address, @RequestParam(required = true) String identity,
			@RequestParam(required = true) String sex, @RequestParam(required = true) String nation,
			@RequestParam(required = true) String office, @RequestParam(required = true) String validity,
			@RequestParam(required = true) String phone) {
		return userAuthenticationService.create(userId, realName, birthday, address, identity, sex, nation, office,
				validity, phone);
	}

}
